<?php

namespace IDock\Insurance\ZYIC\Response;

use IDock\Http\Response;
use IDock\Insurance\ZYIC\Response\AllZYICResponse;
use IDock\Printer\VehicleActualValuePrinter;

class VehicleActualValueResponse extends AllZYICResponse
{
    /**
     * @var VehicleActualValuePrinter $printer
     */
    public $printer = VehicleActualValuePrinter::class;

    public function printerInit(): Response
    {
        $body = $this->getBody();
        $this->printer->actualValue = $body['content']['vehiclePracticalValue'] ?? 0;

        return $this;
    }
}
